const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports =  {
    // 单入口
    // entry: './src/main.js',
    // 多入口文件
    entry: {
        main: './src/main.js',
        app: './src/app.js'
    },
    output: {
        filename: 'js/[name].js',
        path: path.resolve(__dirname, './dist'),
        clean: true
    },
    module: {
        rules: [
            // 配置loader
        ]
    },
    plugins: [
        // 配置插件
        new HtmlWebpackPlugin({
            template: './public/index.html'
        })
    ],
    mode: 'production'
}